
package net.swa.dewei.beans.vo;

/**
 * 对象返回虚拟包装类
 * @author junyu
 *
 * @param <T>
 */
public class VoBackModel<T>
{

    private boolean success;

    private String message;

    private T model;

    private String errorCode;

    public VoBackModel()
    {
        super();
        this.message = "初始默认";
        this.success = false;
    }

    public T getModel()
    {
        return model;
    }

    public void setModel(T model)
    {
        this.model = model;
    }

    public boolean isSuccess()
    {
        return success;
    }

    public void setSuccess(boolean success)
    {
        this.success = success;
    }

    public String getMessage()
    {
        return message;
    }

    public void setMessage(String message)
    {
        this.message = message;
    }

    public String getErrorCode()
    {
        return errorCode;
    }

    public void setErrorCode(String errorCode)
    {
        this.errorCode = errorCode;
    }

    public void setCheckError()
    {
        this.message = "非法访问，访问凭证无效";
        this.success = false;
        this.errorCode = "1";
    }

    public void setCheckSuccess()
    {
        this.errorCode = null;
        this.message = "token校验成功";
        this.success = true;
    }

}
